File manager - Edit - /home/autoph/public_html/projects/Rating-AutoHub/public/css/template.zip
Back
PK ��Zg�&�� � edit.jsnu �[��� (function(e){ "use strict"; var questionArr = []; var url = ""; function submitTemplate(){ $('#template_save').on('click', function(e){ e.preventDefault(); questionArr = []; $(this).attr('disabled',true); $('input[type="checkbox"]:checked').each(function(){ questionArr.push(this.value); }); //push the question id's into an array var formData = new FormData(); formData.append('id',template.id); url = "/templates/update"; formData.append('title',$('#template_name').val()); formData.append('questionArr',questionArr); $.ajax({ type: "POST", url: url, dataType: 'json', data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(result){ toastRWithTime("success","success"); location.replace('/templates'); }, error: function(error){ toastRWithTime(error.responseJSON.message,"error") } }); }); } $(function(){ var qs = template.q_id; $('#template_name').val(template.title); questions.forEach(function(item){ if(qs.includes(item.id.toString())){ $('.questions-list').append(`<div class="form-check"><input class="form-check-input mt-1" type="checkbox" id="`+item.title+`" value="`+item.id+`" checked="">\n<label class="form-check-label" for="`+item.title+`" style="font-size: 1rem">`+item.title+`</label></div>`); } else { $('.questions-list').append(`<div class="form-check"><input class="form-check-input mt-1" type="checkbox" id="`+item.title+`" value="`+item.id+`">\n<label class="form-check-label" for="`+item.title+`" style="font-size: 1rem">`+item.title+`</label></div>`); } }); $('input[type="checkbox"]').change(function(){ questionArr = []; }); $('#clear_selection').on('click', function(e){ e.preventDefault(); $('input[type="checkbox"]').each(function(){ this.checked = false; }); toastRWithTime("Selection Cleared","info"); }); $('#select_all').on('click', function(e){ e.preventDefault(); $('input[type="checkbox"]').each(function(){ this.checked = true; }); toastRWithTime("Selected all","info"); }); $('#template_cancel').on('click', function(e){ location.replace('/templates'); }); submitTemplate(); }); })();PK ��Z�놊 create.jsnu �[��� (function(e){ "use strict"; var questionArr = []; var id = null; var url = null; function submitTemplate(){ $('#template_save').on('click', function(e){ e.preventDefault(); questionArr = []; // $(this).attr('disabled',true); $('input[type="checkbox"]:checked').each(function(){ questionArr.push(this.value); }); //push the question id's into an array var id = $('[name="edit_id"]').val(); var formData = new FormData(); url = "/templates/store"; if(id){ formData.append('id',id); url = "templates/update"; } formData.append('title',$('#template_name').val()); formData.append('questionArr',questionArr); $.ajax({ type: "POST", url: url, dataType: 'json', data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(result){ toastRWithTime("success","success"); window.location.href = '/templates'; }, error: function(error){ toastRWithTime(error.responseJSON.message,"error"); } }); }); } $(function(){ submitTemplate(); $('input[type="checkbox"]').change(function(){ questionArr = []; }); $('#clear_selection').on('click', function(e){ e.preventDefault(); $('input[type="checkbox"]').each(function(){ this.checked = false; }); toastRWithTime("Selection Cleared","info"); }); $('#select_all').on('click', function(e){ e.preventDefault(); $('input[type="checkbox"]').each(function(){ this.checked = true; }); toastRWithTime("Selected all","info"); }); $('#template_back').on('click', function(e){ window.location.href = "/templates"; }); }); })();PK ��Z�D� �# �# template.jsnu �[��� (function(e){ "use strict"; var search_type_filter = []; var templateList = null; var id = null; var url = null; function delay(callback, ms) { var timer = 0; return function () { var context = this, args = arguments; clearTimeout(timer); timer = setTimeout(function () { callback.apply(context, args); }, ms || 0); }; } function initActionUpdate(){ $("[data-action-update]").each(function () { $(this).on("click", function () { var row = $(this).closest("tr"); id = templateList.row(row).data().id; window.location.href = "/templates/" + id; // var formData = new FormData(); // formData.append("id",id); // $.ajax({ // type: "POST", // url: "/templates/get", // dataType: 'json', // data: formData, // processData: false, // contentType: false, // headers: { // 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // }, // success: function(result){ // console.log(result); // $('#templateName').val(result.title); // $('#templateModal').append(`<input type="hidden" name="edit_id" value="`+result.id+`">`); // $('#templateModalTitle').text("EDIT"); // $('#templateModal').modal('show'); // }, // error: function(error){ // } // }); }); }); } function initActionRemove(){ $("[data-action-remove]").each(function () { $(this).on("click", function () { var row = $(this).closest("tr"); id = templateList.row(row).data().id; swal.fire({ title: 'Are you sure you want to delete this item?', icon: 'warning', iconColor: 'red', showDenyButton: true, confirmButtonColor: '#3085d6', confirmButtonText: 'Confirm', denyButtonText: `Cancel`, }).then((result) => { var formData = new FormData(); formData.append("id",id); if(result.isConfirmed){ $.ajax({ type: "POST", url: "/templates/destroy", dataType: 'json', data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(result){ toastRWithTime("success","success"); templateList.draw(false); }, error: function(error){ toastRWithTime(error.responseJSON.message,"error") } }); } else if (result.isDenied){ toastRWithTime('changes not saved','info'); return; } }); }); }); } function getDataTableData(){ var data = {}; return data; } function initList(){ $('.txt_search').on("keyup",delay(function(e){ templateList.search($('.txt_search').val()).draw() },500)); const search_type_default = "Template Name"; const search_types = ["Template Name"]; $.each(search_types, function (i, n) { $(".system-search-type").append( `<li class="dropdown-item cursor-pointer py-0"><span class="text-sm">` + n + `</span></li>` ); }); $(".system-search-type li").each(function () { if ($(this).text() == search_type_default) { $(this).removeClass("active").addClass("active"); var active_items_arr = []; active_items_arr.push(search_type_default); search_type_filter = JSON.stringify(active_items_arr); } $(this).on("click", function () { //remove all selected menu $(".system-search-type") .find("li.active") .map(function () { $(this).removeClass("active"); }); $(this).toggleClass("active"); var active_items = $(".system-search-type") .find("li.active") .map(function () { var item = {}; // item.id = this.value; item.status = $(this).text(); return item; }); var active_items_arr = []; $.each(active_items, function (i, n) { active_items_arr.push(n.status); }); search_type_filter = JSON.stringify(active_items_arr); // refreshOrcrPlateTable(); // if ($('#txt_search').val() != '') { templateList.draw(false); // } }); }); var cols = [ { title: "ID", data: 'id', className: 'align-middle p-1 dt-left', orderable: true, width: "5%", }, { title: "Template Name", data: 'title', className: 'align-middle p-1 dt-left', orderable: true, width: "40%", }, { title: "Action", data: null, orderable: false, width: "20%", className: "align-middle p-1 dt-center", render: function (data, type, row, meta) { return ` <div class="row justify-content-center"> <a data-action-update style="cursor:pointer; width: fit-content;" class="m-1 btn btn-sm btn-primary btn-icon" title="Edit"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</a> <a data-action-remove style="cursor:pointer; width: fit-content;" class="m-1 btn btn-sm btn-danger btn-icon" title="Remove"><i class="fa fa-trash" aria-hidden="true"></i> Remove</a> </div> `; }, }, ]; templateList = $('#templateTable').DataTable({ fnDrawCallback: function () { initActionRemove(); initActionUpdate(); }, order: [[0, "desc"]], retrieve: true, columns: cols, paging: true, lengthChange: false, searching: true, pageLength: 5, info: true, autoWidth: true, responsive: true, processing: true, serverSide: true, autoWidth: true, columnDefs: [ { width: '20%', targets: 0 } ], fixedColumns: true, ajax: { url:'/templates/fetchall', data: function (d){ return $.extend({},d,{ search_type: search_type_filter, data: getDataTableData(), }) } }, sDom: "lrtip", }); } function submitTemplate(){ $('#template_save').on('click', function(e){ var id = $('[name="edit_id"]').val(); var formData = new FormData(); url = "/templates/store"; if(id){ formData.append('id',id); url = "templates/update"; } formData.append('title',$('#templateName').val()); $.ajax({ type: "POST", url: url, dataType: 'json', data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(result){ $('#templateModal').modal('hide'); toastRWithTime("success","success"); templateList.draw(false); }, error: function(error){ } }); }); } $(function(){ initList(); submitTemplate(); $('#reload_list').on('click', function(e){ templateList.draw(false); }); $('#t_create').on('click', function(e){ e.preventDefault(); window.location.href = "/templates/create"; }); }); })();PK <F�Z�U�259 59 list.phpnu �[��� <?php ?> <!DOCTYPE html> <html lang="en"> <head> <?php self::render('common/meta'); ?> <!-- insert custom meta here --> <title><?= env('APP_NAME') ?></title> <?php self::render('common/css'); ?> <!-- insert custom css here --> <link rel="stylesheet" href="<?= asset_version("/assets/plugins/jstree/themes/default/style.min.css") ?>"> <!-- Select2 --> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/select2/css/select2.min.css") ?>"> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css") ?>"> <!-- summernote --> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/summernote/summernote-bs4.min.css") ?>"> <!-- dropzone --> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/dropzone/min/dropzone.min.css") ?>"> <!-- DataTables --> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css") ?>"> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/datatables-responsive/css/responsive.bootstrap4.min.css") ?>"> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/datatables-buttons/css/buttons.bootstrap4.min.css") ?>"> <!-- Tempusdominus Bootstrap 4 --> <link rel="stylesheet" href="<?= asset_version("/assets/core/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css") ?>"> <style> </style> </head> <body class="hold-transition sidebar-mini layout-fixed text-sm layout-footer-fixed"> <div class="wrapper"> <!-- insert preloader here --> <?php self::render('common/preloader'); ?> <!-- insert header --> <?php self::render('common/header', get_defined_vars()); ?> <!-- insert sidebar --> <?php self::render('common/sidebar'); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Main content --> <section class="content pt-2"> <input type="hidden" name="csrf_token" id="csrf_token" value="<?= csrf_token(); ?>"> <div id="filter-list-section" class="hidden bg-white p-3 mb-2 "> Filters </div> <div class="bg-white p-3 "> <!-- solid sales graph --> <div class="row pl-2"> <div class="col-md-5"> <div class="row justify-content-lg-start justify-content-center"> <!-- <button id="filter-list" type="button" title="" class="btn btn-primary px-2 mr-2 btn-sm mb-1"><i class="fa fa-filter"></i> Filters</button> --> <div class="input-group pl-0 mb-1" style="width:275px;"> <div class="input-group-append cursor"> <div class="input-group-text px-1 border form-control-sm"> <div class="tooltip-me" title="Filter by category"> <button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown"> <i class="fas fa-search"></i> <u>Search</u> </button> <ul class="dropdown-filter product-search-type dropdown-menu cursor"> </ul> </div> </div> </div> <input id="txt_search" type="search" class=" form-control form-control-sm" placeholder="Keywords..."> </div> </div> </div> <div class="col-md-7"> <div class="row justify-content-lg-end justify-content-center"> <a id="btn_create" class="btn btn-primary btn-sm mr-2" role="button"><i class="fa fa-plus"></i> Create</a> <!-- <a class="btn btn-primary btn-sm mr-2" href="<?= url('users.import') ?>" role="button"><i class="fas fa-file-import"></i> Import</a> --> <a class="btn btn-primary btn-sm mr-2" id="reload-list" role="button"><i class="fas fa-sync"></i> Reload</a> </div> </div> </div> <div class=""> <table id="tableList" class="table table-sm table-bordered table-striped"> </table> </div> </div> </section> <!-- /.content --> </div> <div class="modal_container"> <div class="modal" id="modal_template"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="overlay modal_template_overlay" style="display:none;"> <i class="fas fa-2x fa-sync fa-spin"></i> </div> <form id="TemplateForm"> <div class="modal-header bg-light py-1"> <span class="modal-title text-md font-weight-bold" id="car_club_import_modal_title">Template</span> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="row"> <div class="col-sm-12"> <div class="form-group mb-2"> <label class=" mx-0 my-0 font-weight-normal">Name <span class="text-muted text-sm font-italic" hidden>(Optional)</span></label> <!-- <span style="color:red;"><strong>*</strong></span> --> <input id="txt_name" name="txt_name" type="text" class=" form-control form-control-sm"> </div> </div> <div class="col-sm-12"> <div class="form-group mb-2"> <label class="m-0 font-weight-normal">Event <span class="text-muted text-sm font-italic">(Optional)</span></label> <select class="form-control form-control-sm" name="event" style="width: 100%;"> </select> </div> </div> <div class="col-sm-12"> <div class="form-group mb-2"> <label class=" mx-0 my-0 font-weight-normal">Template <span class="text-muted text-sm font-italic" hidden>(Optional)</span></label> <textarea class="form-control" rows="3" placeholder="" id="txt_template" name="txt_template"></textarea> </div> </div> <div class="col-sm-12 mt-2"> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-bold">Parameters:</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{firstname}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{lastname}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{name}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{email}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{mobile}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{qr}</label> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{partner}</label> <span> - </span> <span>Flight mate of player</span> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{course_location}</label> <span> - </span> <span>Course location of player</span> </div> <div class="form-group mb-0"> <label class=" mx-0 my-0 font-weight-normal text-danger">{flight_location}</label> <span> - </span> <span>Flight location of player</span> </div> </div> </div> </div> <div class="modal-footer justify-content-between py-1 px-3"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button id="btn_save" type="submit" class="btn btn-primary">Save</button> </div> </form> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> </div> <!-- insert footer --> <?php self::render('common/footer'); ?> <!-- insert control sidebar --> <?php self::render('common/control_sidebar'); ?> </div> <!-- ./wrapper --> <!-- common sctipts --> <?php self::render('common/script'); ?> <!-- Select2 --> <script src="<?= asset_version("/assets/core/plugins/select2/js/select2.full.min.js") ?>"></script> <!-- Summernote --> <script src="<?= asset_version("/assets/core/plugins/summernote/summernote-bs4.min.js") ?>"></script> <!-- JQuery Repeater --> <script src="<?= asset_version("/assets/plugins/jquery.repeater/jquery.repeater.min.js") ?>"></script> <!-- Dropzone --> <script src="<?= asset_version("/assets/core/plugins/dropzone/min/dropzone.min.js") ?>"></script> <!-- DataTables & Plugins --> <script src="<?= asset_version("/assets/core/plugins/datatables/jquery.dataTables.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-responsive/js/dataTables.responsive.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-responsive/js/responsive.bootstrap4.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-buttons/js/dataTables.buttons.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-buttons/js/buttons.bootstrap4.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/jszip/jszip.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/pdfmake/pdfmake.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/pdfmake/vfs_fonts.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-buttons/js/buttons.html5.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-buttons/js/buttons.print.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/datatables-buttons/js/buttons.colVis.min.js") ?>"></script> <!-- InputMask --> <script src="<?= asset_version("/assets/core/plugins/moment/moment.min.js") ?>"></script> <script src="<?= asset_version("/assets/core/plugins/inputmask/jquery.inputmask.min.js") ?>"></script> <!-- Tempusdominus Bootstrap 4 --> <script src="<?= asset_version("/assets/core/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js") ?>"></script> <script> const create_template_uri = '<?= url('sms.templates.create') ?>'; const template_list_uri = '<?= url('sms.templates.list') ?>'; const event_options_uri = '<?= url('events.options') ?>'; const update_template_status_uri = '<?= url('sms.templates.status') ?>'; const fetch_template_uri = '<?= url('sms.templates.fetch') ?>'; </script> <script src="<?= asset_version("/assets/js/sms/template/list.js") ?>"></script> </body> </html>PK ��Zg�&�� � edit.jsnu �[��� PK ��Z�놊 � create.jsnu �[��� PK ��Z�D� �# �# template.jsnu �[��� PK <F�Z�U�259 59 9 list.phpnu �[��� PK # sr
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings